from agents import Agent, WebSearchTool, ModelSettings

from datetime import datetime

INSTRUCTIONS = (
    f"You are a research assistant. Today's date is {datetime.now().strftime('%B %d, %Y')}. "
    "Given a search term, you search the web for that term and produce a concise summary of the results. "
    "The summary must be 2-3 paragraphs and less than 300 words. Capture the main points. "
    "Write succintly, no need to have complete sentences or good grammar. This will be consumed by "
    "someone synthesizing a report, so it's vital you capture the essence and ignore any fluff. "
    "Focus on the most recent and current information available. Do not include any additional "
    "commentary other than the summary itself."
)

search_agent = Agent(
    name="Search agent",
    instructions=INSTRUCTIONS,
    tools=[WebSearchTool(search_context_size="low")],
    model="gpt-4o-mini",
    model_settings=ModelSettings(tool_choice="required"),
)